feat: use 1 minute window for searches#2019
Conversation
🦋 Changeset detectedLatest commit: ba2ab5d The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Review
|
E2E Test Results✅ All tests passed • 128 passed • 3 skipped • 1015s
Tests ran across 4 shards in parallel. |
| jest.mock('@/utils/searchWindows', () => { | ||
| const original = jest.requireActual('@/utils/searchWindows'); | ||
| const mockWindows = [ | ||
| 6 * 60 * 60, // 6h | ||
| 6 * 60 * 60, // 6h | ||
| 12 * 60 * 60, // 12h | ||
| 24 * 60 * 60, // 24h | ||
| ]; | ||
| return { | ||
| ...original, | ||
| DEFAULT_TIME_WINDOWS_SECONDS: mockWindows, | ||
| generateTimeWindowsDescending: ( | ||
| startDate: Date, | ||
| endDate: Date, | ||
| windowDurationsSeconds?: number[], | ||
| ) => | ||
| original.generateTimeWindowsDescending( | ||
| startDate, | ||
| endDate, | ||
| windowDurationsSeconds ?? mockWindows, | ||
| ), | ||
| }; | ||
| }); | ||
|
|
There was a problem hiding this comment.
This may look odd, but it's done in the downstream repo too
Summary
This PR changes searches to a 1 minute up front window, rather than a 6h. Also, the refresh time was moved from 4s back to 10s.
How to test locally or on Vercel
References
Closes HDX-3866